class Gallery < DatabaseObject

  attr_accessor :id, :title, :description, :date_created

  def initialize(user, title, description = "No description.")
    @id = $database.galleries.last.id + 1
    @user = user.id
    @title = title
    @description = description
    @date_created = current_time
    raise "user must be User instance" unless user.class == User
    raise "@user must be Integer" unless @user.kind_of? Integer
  end

end
